﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title>Biểu thuế xuất nhập khẩu - Tìm kiếm</title>
    <link href="CSS/jquery.autocomplete.css" rel="stylesheet" type="text/css" />
    <script src="Script/jquery-1.4.2.min.js" type="text/javascript"></script>
    <script src="Script/jquery.autocomplete.js" type="text/javascript"></script>

    <script type="text/javascript">
        $(document).ready(function () {
            $("input[JNS=txtUserInput]").autocomplete("GetProductHandler.ashx", { minChars: 2, mustMatch: true, max:20 })
            .result(function (event, item) {
                if (item != undefined) {
                    $("input[JNS=txtProCode]")[0].value = item[1];
                    $("input[JNS=txtProID]")[0].value = item[2];
                }
                else {
                    $("input[JNS=txtProCode]")[0].value = '';
                    $("input[JNS=txtProID]")[0].value = '';
                }
            });



        });
    </script>

</head>
<body>
    <form id="form1" runat="server">
    <div>
        <h3>SEARCHING</h3>
        ------------------------------------------------------------<br /><br />
        Enter HF Code or describ the product:
        <asp:TextBox JNS="txtUserInput" Width="300px" runat="server" />
        (wat da ya wanna?)
        <br />
        <br />
        -- Selected item -------------------------------<br />
        <br />
        <table border="0" cellpadding="0" cellspacing="10">
            <tr>
                <td>
                    Product Code:
                </td>
                <td>
                    <asp:TextBox JNS="txtProCode" Width="200px" runat="server" />
                </td>
            </tr>
            <tr>
                <td>
                    Product ID:
                </td>
                <td>
                    <asp:TextBox JNS="txtProID" Width="200px" runat="server" />
                </td>
            </tr>
        </table>
        <br />
        ------------------------------------------------------<br />
        <br />
        <br />
    </div>
    </form>
</body>
</html>
